package com.itheima.ydd.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.ydd.entity.YddArticle;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.ydd.vo.HotVo;
import com.itheima.ydd.vo.MyArticleVo;
import com.itheima.ydd.vo.YddArticleVo;

import java.util.HashMap;

/**
 * <p>
 *  服务类
 * </p>
 */
public interface IYddArticleService extends IService<YddArticle> {

    Page<YddArticleVo> pageByCondition(Page<YddArticle> pageInfo, LambdaQueryWrapper<YddArticle> queryWrapper);

    /**
     * 热门置顶文章数据(首页)
     * @param pageInfo
     * @param wrapper
     * @return
     */
    HashMap<String, Object> selectByPage(Page<YddArticle> pageInfo, LambdaQueryWrapper<YddArticle> wrapper);

    /**
     * 我的文章
     * @param pageInfo
     * @param queryWrapper
     * @return
     */
    MyArticleVo selectByMyArticlePage(Page<YddArticle> pageInfo, LambdaQueryWrapper<YddArticle> queryWrapper);
    /**
     * 最新文章
     *
     * @return
     */
    HotVo YddArticleCatelist();

}
